package com.jzo2o.customer.controller.worker;

import com.jzo2o.customer.model.dto.request.WorkerCertificationAuditAddReqDTO;
import com.jzo2o.customer.model.dto.response.RejectReasonResDTO;
import com.jzo2o.customer.service.IWorkerCertificationService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController("workerCertificationAuditController")
@RequestMapping("/worker/worker-certification-audit")
@Api(tags = "我的账户设置接口")
public class WorkerCertificationAuditController {
    @Resource
    private IWorkerCertificationService workerCertificationService;

    /**
     * 提交认证申请
     *
     * @param dto
     */
    @PostMapping
    @ApiOperation("服务端提交认证申请")
    public void addAudit(@RequestBody WorkerCertificationAuditAddReqDTO dto) {
        workerCertificationService.addAudit(dto);
    }

    /**
     * 查询最新的驳回原因
     *
     * @return
     */
    @GetMapping("/rejectReason")
    @ApiOperation("查询最新的驳回原因")
    public RejectReasonResDTO rejectReason() {
        return workerCertificationService.rejectReason();
    }


}
